Wireless ear bud system with pose detection

ABSTRACT

Ear buds may have sensors to gather orientation information such as accelerometer measurements during user movements. A host electronic device may communicate wirelessly with the ear buds and may form part of an ear bud system that supplies the user with coaching and feedback while evaluating user performance of a head movement routine or other exercise routine. During operation, the ear buds may gather accelerometer data in a first reference frame such as a reference frame associated with the ear buds and may use a rotation matrix to rotate the data in the first reference frame into a second reference frame such as a neutral reference frame with a fixed orientation to the earth. The data in the neutral reference frame may be analyzed using a user head pose look-up table to categorize measured user head positions as corresponding to respective user head poses.

This application is a division of application Ser. No. 15/914,554, filedMar. 7, 2018, which claims the benefit of provisional patent applicationNo. 62/480,214, filed Mar. 31, 2017, which are hereby incorporated byreference herein in their entireties.

BACKGROUND

This relates generally to electronic devices, and, more particularly, towearable electronic devices such as ear buds.

Electronic devices such as laptop computers and cellular telephones arepopular portable devices. Wearable devices such as wristwatch devicesand ear buds can provide enhanced freedom of movement. For example,wireless ear buds can be used to play audio content for a user of anelectronic device such as a cellular telephone or computer withoutcumbersome cables.

It would therefore desirable to be able to provide improved wearableelectronic devices such as improved wireless ear buds.

SUMMARY

A system is provided in which electronic equipment such as ear buds areused to provide audio information to a user while using orientationsensors such as accelerometers to gather orientation information. A hostelectronic device may communicate wirelessly with the ear buds. Duringoperation, the ear buds may be used to provide a user with exerciseroutine coaching such as audible instructions while a user is performingan exercise routine such as a head movement routine. The head movementroutine may involve, for example, moving the user's head into a sequenceof predefined head poses (e.g., left tilt, forward tilt, right tilt, andback tilt).

While being coached, the ear buds may gather accelerometer data in afirst reference frame such as a reference frame associated with the earbuds and may use a rotation matrix to rotate the data in the firstreference frame into a second reference frame such as a neutralreference frame. The data in the neutral reference frame may be analyzedusing a user head pose look-up table with threshold accelerometer valuesfor different head poses to categorize the data as corresponding torespective user head poses.

Feedback such as audible feedback may be provided to a user based onevaluation of user performance of the head movement routine. Othersuitable actions may be taken such as issuing performance reports andalerts. If desired, additional sensors may be used in gatheringorientation data during user movement routines and additionalevaluation, guidance, and feedback operations may be performed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of an illustrative system includingelectronic equipment that communicates wirelessly with wearableelectronic devices such as wireless ear buds in accordance with anembodiment.

FIG. 2 is a perspective view of an illustrative ear bud in accordancewith an embodiment.

FIG. 3 is a side view of an illustrative ear bud located in an ear of auser in accordance with an embodiment.

FIG. 4 is a graph of illustrative ear bud accelerometer output signalsgathered while a user is performing a head pose in accordance with anembodiment.

FIG. 5 is a flow chart of illustrative operations involved incalibrating an ear bud orientation sensor in accordance with anembodiment.

FIG. 6 is a flow chart of illustrative operations involved in operatinga system with wireless ear buds that include orientation sensorcircuitry such as accelerometer circuitry in accordance with anembodiment.

FIG. 7 is a flow chart of illustrative steps involved in using a systemhaving wearable electronic devices such as wireless ear buds inaccordance with an embodiment.

DETAILED DESCRIPTION

Wearable electronic devices such as ear buds may be used to gatherinformation on the behavior of a user. For example, ear buds may includesensors such as orientation sensors that gather information on theorientation of a user's head. In some scenarios, the ear buds may formpart of a system that uses the orientation information or other sensorinformation from the ear buds. For example, ear bud sensor data may beused in a system in which ear buds communicate wirelessly with a hostdevice.

An illustrative system of the type that may include wearable electronicequipment such as one or more ear buds is shown in FIG. 1. As shown inFIG. 1, system 8 may include one or more host devices such as hostdevice 10 and one or more wearable devices such as ear buds 24. Hostelectronic device 10 of FIG. 1 may be a cellular telephone, may be acomputer, may be a wristwatch device, may be a head-mounted displaydevice, may be other wearable equipment, may be part of an embeddedsystem (e.g., a system in a plane or vehicle), may be part of a homenetwork, may be a television or set-top box, may be a voice-controlledassistant device, may be a portable device or a device that is notportable, may be other suitable electronic equipment, or may be anetwork based on a group of such devices.

As shown in FIG. 1, electronic device 10 may have control circuitry 16.Control circuitry 16 may include storage and processing circuitry forsupporting the operation of device 10. The storage and processingcircuitry may include storage such as hard disk drive storage,nonvolatile memory (e.g., flash memory or otherelectrically-programmable-read-only memory configured to form a solidstate drive), volatile memory (e.g., static or dynamicrandom-access-memory), etc. Processing circuitry in control circuitry 16may be used to control the operation of device 10. The processingcircuitry may be based on one or more microprocessors, microcontrollers,digital signal processors, baseband processors, power management units,audio chips, application specific integrated circuits, etc.

Device 10 may have input-output circuitry 18. Input-output circuitry 18may include wireless communications circuitry 20 (e.g., radio-frequencytransceivers) for supporting communications with wireless wearabledevices such as ear buds 24 or other wireless wearable electronicdevices via wireless links 26. Circuitry 20 may include satellitenavigation system circuitry (e.g., Global Positioning System receivercircuitry) for making measurements of geographic location and velocity.Ear buds 24 may have corresponding wireless communications circuitry 30for supporting communications with circuitry 20 of device 10 and, ifdesired, for making measurements of geographic location and velocity. Insome configurations, ear buds 24 may use wireless circuitry 30 tocommunicate with each other directly or through device 10 over wirelesslinks 26. Devices such as ear buds 24 may also communicate with devicessuch as device 10 using wired connections. In general, the devices thatcommunicate with device 10 may be any suitable portable and/or wearableequipment. Configurations in which system 8 has wireless wearabledevices such as ear buds 24 are sometimes described herein as anexample.

Input-output circuitry in device 10 such as input-output devices 22 maybe used to allow data to be supplied to device 10 and to allow data tobe provided from device 10 to external devices. One or more of theseinput-output devices may also be included in ear buds 24 and controlledusing control circuitry 28.

Input-output devices 22 may include buttons, joysticks, scrollingwheels, touch pads, key pads, keyboards, microphones, speakers, displays(e.g., touch screen displays), tone generators, haptic output devicessuch as electromechanical actuators and vibrators (e.g., piezoelectricvibrating components, etc.), cameras, sensors, light-emitting diodes andother status indicators, data ports, etc. The sensors in input-outputdevices 22 may include orientation sensors (e.g., accelerometers,gyroscopes, and/or magnetic sensors such as compasses), force sensors(e.g., capacitive force sensors, piezoelectric force sensors, straingauges, etc.), touch sensors such as capacitive touch sensors (e.g., intrack pads, displays, or buttons or other stand-alone devices), infraredproximity sensors and/or other light-based proximity sensors, capacitiveproximity sensors, color-sensing and light-intensity-sensing ambientlight sensors, audio sensors (e.g., diaphragms in microphones), digitalimage sensors (e.g., sensors in cameras), range-detection sensors suchas LIDAR (light detection and ranging) sensors, radar, and echolocationsensors, radio-frequency sensors (e.g., circuitry that allows system 8to gather position information and/or orientation information based ontriangulation techniques, time-of-flight techniques, received signalstrength techniques, etc.), free-space gesture sensors (e.g.,camera-based, laser-scanner based, acoustic, capacitive, etc.), eyetracking sensors, temperature sensors, gas sensors, particulate sensors,humidity sensors, pressure sensors (e.g., to measure atmosphericpressure), and/or other sensors. A user can control the operation ofdevice 10 by supplying commands through input-output devices 22 and mayreceive status information and other output from device 10 using theoutput resources of input-output devices 22. If desired, some or all ofthese input-output devices may be incorporated into ear buds 24.

Each ear bud 24 may have control circuitry 28 (e.g., control circuitrysuch as control circuitry 16 of device 10), wireless communicationscircuitry 30 (e.g., one or more radio-frequency transceivers forsupporting wireless communications over links 26), may have one or moresensors 32 (e.g., sensors of the type that may be included in device10), and may have additional components such as speakers 34 andmicrophones 36. Ear buds 24 may include orientation sensors 38 (e.g.,accelerometers, gyroscopes, and/or compasses).

Sensors 38, which may sometimes be referred to as accelerometers, maygather data on the orientation of ear buds 24 dynamically, so that thecomponents of system 8 may measure the orientation of a user's head whena user is wearing one or more of ear buds 24. Speakers 34 may play audiointo the ears of a user. Microphones 36 may gather audio data such asthe voice of a user who is making a telephone call and can detect voicecommands. Proximity sensors in sensors 32 may emit and/or detect lightand/or may include capacitive proximity sensor circuitry to generateproximity output data based on measurements by capacitance sensors (asexamples). Proximity sensors may be used to detect the presence of aportion of a user's ear to ear bud 24 and/or may be triggered by thefinger of a user (e.g., when it is desired to use a proximity sensor asa capacitive button or when a user's fingers are gripping part of earbud 24 as ear bud 24 is being inserted into the user's ear). User inputsuch as intentional taps on ear buds 24 may also be detected usingaccelerometers (sensors 38) and used in controlled ear buds 24 and/orhost 10.

Sensors 38 may detect when ear buds 24 are in motion or are at rest. Insome arrangements, information from sensor 38 can be used to evaluateuser performance of an exercise routine such as a head movement routine(e.g., whether a user is satisfactorily following a predeterminedexercise routine such as a head movement routine in which the userintentionally places their head in various stretch positions (e.g., headtilted to left, right, forward, or back). These stretch positions, whichmay sometimes be referred to as user head poses, user head tilts, neckstretches, poses, etc., may be used to help stretch and relax themuscles in a user's upper body.

Using gyroscope and/or compass circuitry in sensors 38, sensors 38 canalso monitor whether a user is following a predetermined exerciseroutine in which the user's head is rolled, twisted, and/or turnedsmoothly through various orientations. When used in combination withwrist watch devices and other wearable devices on other portions of auser's body (e.g., a wrist watch worn on a user's arms, legs, etc.) insystem 8, system 8 can use ear buds 24 in detecting more complex usermovements (e.g., Yoga positions and/or other exercise movementsinvolving multiple portions of the user's body). In these configurationsand other configurations for system 8, host electronic device 10 mayserve as a master device and ear buds 24 and/or other wearableelectronic devices on the body of the user may serve as slave devices orother control architectures may be used (e.g., distributed networks inwhich the devices in system 8 serve as peer devices, networks in whichear buds 24 or other wearable devices serve as master(s), etc.).

Control circuitry in system 8 such as control circuitry 28 in ear buds24 and control circuitry 16 of device 10 may be used to run software onear buds 24 and device 10 and/or other devices in system 8. Duringoperation, the software running on control circuitry 28 and/or 16 may beused in gathering sensor data, user input, and other input and may beused in taking suitable actions in response to detected conditions. Asan example, control circuitry 28 and/or control circuitry 16 may be usedin providing a user with audio exercise routine guidance (e.g., verbalcommands such as “perform left stretch now” or other head pose guidance,other audible information such as a sequence of chimes, etc.) whiledetermining the orientation of a user's head and providing feedbackbased on an analysis of whether the user is satisfactorily completing adesired exercise routine. Music and other content may also be provided.In some scenarios, ear buds 24 may be used in handling other audioinformation, such as audio signals for cellular telephone calls. Controlcircuitry 28 and/or 16 may also be used in coordinating operationbetween a pair of ear buds 24 that are paired with a common host device(e.g., device 10), handshaking operations, calibration operations,and/or other maintenance and support operations.

In some situations, it may be desirable to accommodate stereo playbackfrom ear buds 24. This can be handled by designating one of ear buds 24as a primary ear bud and one of ear buds 24 as a secondary ear bud. Theprimary ear bud may serve as a slave device while device 10 serves as amaster device. A wireless link between device 10 and the primary ear budmay be used to provide the primary ear bud with stereo content. Theprimary ear bud may transmit one of two channels of stereo content tothe secondary ear bud for communicating to the user (or this channel maybe transmitted to the secondary ear bud from device 10). Microphonesignals (e.g., voice information from a user during a telephone call)may be captured by using microphone 36 in the primary ear bud andconveyed wirelessly to device 10.

FIG. 2 is a perspective view of an illustrative ear bud. As shown inFIG. 2, ear bud 24 may include a housing such as housing 40. Housing 40may have walls formed from plastic, metal, ceramic, glass, sapphire orother crystalline materials, fiber-based composites such as fiberglassand carbon-fiber composite material, natural materials such as wood andcotton, other suitable materials, and/or combinations of thesematerials. Housing 40 may have a main portion such as main body 40-1that houses audio port 42 and a stem portion such as stem 40-2 or otherelongated portion that extends away from main body portion 40-1. Duringoperation, a user may grasp stem 40-2 and, while holding stem 40-2, mayinsert main portion 40-1 and audio port 42 into the ear. Audio portssuch as audio port 42 may be used for gathering sound for a microphoneand/or for providing sound to a user (e.g., audio associated with atelephone call, media playback, an audible alert, etc.). For example,audio port 42 of FIG. 2 may be a speaker port that allows sound fromspeaker 34 (FIG. 1) to be presented to a user. Sound may also passthrough additional audio ports (e.g., one or more perforations may beformed in housing 40 to accommodate microphone 36).

FIG. 3 is a diagram showing how ear bud 24 may be worn in ear 52 ofuser's head 50. Axis y (and perpendicular axes x and z) form anear-bud-centric coordinate system (user's head frame of reference) thatthe accelerometer (and/or other orientation sensor circuitry) in ear bud24 may use in collecting three respective channels of accelerometer data(e.g., x-axis accelerometer signals, y-axis accelerometer signals, andz-axis accelerometer signals). As shown in FIG. 3, when main portion40-1 of ear bud 24 is being worn in ear 52, elongated ear bud body 40(e.g., stem 40-2) may extend along an axis y that is not generallyperpendicular to the surface of the earth. During operation, controlcircuitry in system 8 may rotate raw three-axis accelerometer data toplace this data into a neutral coordinate system such as theillustrative X-Y-Z coordinate system of FIG. 3. For example, rawbody-frame-of-reference accelerometer data such as raw data vector Vr,which includes three channels of body frame accelerometer data (x, y,z), may be transformed into neutral-frame-of-reference data such asneutral frame vector Vn, which includes three adjusted accelerometervalues (X, Y, Z), by multiplying the body frame vector Vr by a rotationmatrix R.

This transforms the raw accelerometer data Vr into data Vn forcomparison to predefined threshold limits. For example, when a user'shead is oriented in its normal upright position along vertical axis Y ofFIG. 3, Vn will be equal to 0, 1, 0, because all accelerometer data inthe reference frame will be in the vertical Y axis (perpendicular to thesurface of the earth) and none will be in the horizontal X and Z axes(parallel to the surface of the earth). The limits to which the neutralframe accelerometer data is compared may be, for example, look-up-tablethreshold values that define the head orientations that correspond tovarious respective head poses.

FIG. 4 is a graph of illustrative raw accelerometer data (x, y, z)during a head movement such as a right head tilt (right pose). Ifdesired, gyroscope data or other orientation system data may be gatheredto measure the amount (e.g., a value in degrees or other units) by whicha user has rotated head 50 about vertical axis Y. Compass data may beused to enhance orientation measurement accuracy, if desired.

Illustrative operations involved in calibrating ear buds 24 to producerotation matrix R are shown in the flow chart of FIG. 5.

Ear buds 24 may be calibrated each time device 10 is powered up,periodically (e.g., according to a predetermined schedule or refreshtime period), and/or when other calibration conditions are satisfied.

During the operations of block 70, control circuitry 28 may gatheraccelerometer data with sensor(s) 38 and may store this accelerometerdata in a circular data buffer. The accelerometer data that is beinggathered may be compared to predetermined threshold values to determinewhether ear buds 24 are in a quiescent state in which the user is notmoving significantly. Control circuitry 28 can conclude that ear buds 24and the associated accelerometer data are quiescent when theaccelerometer data is less than the predetermined threshold values for apredetermined period of time (e.g., 0.3-1 s, at least 0.1 s, at least 1s, at least 5 s, less than 30 s, less than 10 s, or other suitabletime). When the user's head 50 is stationary or nearly stationary, andcontrol circuitry 28 determines that ear buds 24 are being used in aquiescent period (quiescent state), processing can proceed to block 72.

During the operations of block 72, the contents of the circular databuffer can be processed to determine the average of the accelerometervalues in all or part of the circular data buffer (vector Vr). Forexample, the x-axis accelerometer values can be averaged to produce anaverage x value, the y-axis accelerometer values can be averaged toproduce an average y value, and the z-axis accelerometer values can beaveraged to produce an average z value. This average vector correspondsto the expected accelerometer output when the user's head is in itsnormal upright (vertical) orientation. Vector Vr can be compared to apreviously stored value of Vr to determine whether there is asignificant difference between these values (more than a thresholdamount). If the presently measured value of Vr and the stored value ofVr are within the threshold amount, the stored value of Vr andassociated stored value of rotation matrix R can be retained.

In response to detecting that the value of Vr that was produced duringblock 72 and the stored value of Vr differ by more than the thresholdamount (e.g., the stored value of Vr is empty because calibrationoperations are being performed for the first time or the new and storedVr values otherwise differ by more than the threshold), controlcircuitry 28 can perform the operations of block 76. During block 76,control circuitry 28 can compute rotation matrix R from equations 1, 2,3, and 4, with angles rotated about the neutral axis (theta_x, theta_y,and theta_z) from accelerometer data Vr.R=(R_x)(R_y)(R_z)  (1)R_x=[[1,0,0],[0,cos(theta_x),−sin(theta_x)],[0,sin(theta_x),cos(theta_x)]]  (2)R_y=[[cos(theta_y),0,sin(theta_y)],[0,1,0],[−sin(theta_y),0,cos(theta_y)]]  (3)R_z=[[cos(theta_z),−sin(theta_z),0],[sin(theta_z),cos(theta_z),0],[0,0,1]]  (4)

In equations 1, 2, 3, and 4, angles theta_x, theta_y, and theta_z aredetermined from sensor data Vr and rotation matrix R is the matrix thatrotates data Vr to vector Vn (e.g., Vn=RVr) where Vn is a vector (e.g.,0, 1, 0) associated with a neutral reference frame. (The neutralreference frame may be characterized by neutral-frame X, Y, and Z axeswhere the X-Z plane is parallel to the surface of the earth, whereas thebody reference frame may be characterized by than body-frame x, y, and zaxes where y is directed along the length of the ear bud housing). Thecomputed value of R can be stored in storage in control circuitry 28during the operations of block 78. During the operations of block 80,control circuitry 28 can store the newly computed value of Vr in placeof the previously stored value of Vr (e.g., circuitry 28 may update Vr).

Illustrative operations involved in using system 8 while a user isperforming a head stretching exercise are shown in FIG. 6.

During the operations of block 82, control circuitry 28 may use sensor38 (e.g., an accelerometer) to gather raw accelerometer data Vrd. Ifdesired, filtering operations may be performed while capturing data Vrd.For example, data Vrd may be collected by maintaining running averagesof the output of each sensor channel for a predetermined period of time,thereby averaging out high frequency noise. Raw data Vrd may be gatheredat 100-200 Hz or other suitable data capture rate.

During the operations of block 84, control circuitry 28 may applyrotation matrix R to data Vrd to transform orientation measurement Vrdfrom the user's body reference frame to rotated (calibrated) orientationmeasurement Vd in the neutral reference frame (e.g., Vd is set equal toRVrd).

During the operations of block 86, control circuitry 28 may process dataVd to determine whether a predefined pose is being performed. A look-uptable maintained in storage in control circuitry 28 or other suitabledata structure or function may be used in analyzing data Vd to determinewhether the head of user has been moved into a position associated witha desired pose. Consider, as an example, a scenario in which a user isperforming a routine in which the user is expected to sequentially tiltto the left, to the front, to the right, and to the back. Data Vd mayfall within predefined limits associated with a left pose (e.g., a neckstretch to the left), a front pose (e.g., a forward neck stretch), aright pose (e.g., a neck stretch to the right), or a back pose (e.g., aneck stretch in which the user's head tilts backwards). Separate rows inthe look-up table may be used in storing threshold data values in theneutral reference frame that correspond to each of these poses. Bycomparing Vd to the look-up table information, the pose being performedby the user can be characterized. If, for example, the user's head istilted to the left in a left pose, Vd will fall within the predeterminedaccelerometer values (e.g., maximum and minimum values for each of theaccelerometer channels) associated with a left pose, so the user's headorientation may be characterized as a left pose.

During the operations of block 88, after categorizing the user's headorientation by determining which pose is being performed, the pose thatis being performed can be compared to a desired sequence of posesassociated with a head movement exercise routine. If, for example, theuser was expected to perform neck stretches in aleft-forward-right-backward order, control circuitry 28 may, during theoperations of block 88 determine whether the pose that was identifiedduring the operations of block 86 falls within the desired pose sequenceand has occurred in a timely fashion. If a pose is performedunsatisfactorily (e.g., in the wrong order, at the wrong time, etc.),the user may be provided with an alert (e.g., negative feedback in theform of an audible tone indicative of an unsatisfactory pose such as abuzzer sound, spoken feedback, etc.). Positive feedback such as apleasant chime or other positive audio feedback can be played back tothe user with ear buds 24 in the event that control circuitry 28determines that the desired pose has been satisfactorily performed. Headpose guidance may be provide to a user during the operations of FIG. 6.For example, control circuitry 28 may use speaker 34 to provide the userwith instructions such as “tilt left now” that serve as real-time userhead pose guidance.

In evaluating poses during the operations of block 88 to determinewhether a predetermined exercise routine is being performedsatisfactorily, control circuitry 28 may require that the user performeach pose within a predetermined time slot (e.g., in a series of 1second time slots accompanied by a 1 Hz sequence of audible coachingclicks), may require that each pose be performed within a given timelimit following detection of successful completion of a previous pose(e.g., control circuitry 28 may require that the forward-tilting pose beperformed within 1 s of successful completion of the leftward-tiltingpose, etc.), or other pose performance criteria may be established. Posepatterns may involve circular sequences of head poses and/or otherpatterns (back and forth, side to side, diagonal, etc.). As indicated byline 90, processing can loop back to block 82 after block 88 so thatadditional accelerometer data can be captured and analyzed.

If desired, neck movements can be categorized by using sensor 38 (e.g.,a compass and/or gyroscope in sensor 38) to measure head rotation inaddition to or instead of measuring head tilt. In this way, stretchingroutines can be analyzed that involve head rolls and other movementsinvolving head rotation in addition to head tilts. The operations ofFIGS. 5 and 6 may be performed using control circuitry 28 of ear buds 24and/or control circuitry 16 of one or more devices such as device 10.

Other sensors can be used to gather information on the user's headorientation and movement if desired. Sensors in host 10 and/or otherdevices that are wirelessly communicating with ear buds 24 and/or host10 can also be used in monitoring the movements of the user. Forexample, wearable devices such as wristwatch devices, health bands,shoes, gloves, and other devices can be used to measure where the user'shands, arms, feet, legs, and other body parts are moving. This allowsear buds 24, host 10, and/or other equipment in system 8 to determinewhether a user is performing desired yoga poses, is walking or runningwith desired characteristics, etc.

Device 10 or other equipment in system 8 can provide visual output suchas visual pose guidance or other coaching information that assists theuser in performing a desired routine. For example, a cellular telephone,tablet computer, desktop computer, television, or other device with adisplay may display still and/or moving images illustrating desiredposes (e.g., images showing a real person or a graphic representation ofa person tilting their head to the left when a left pose is desired). Ifdesired, visual guidance can be provided using text or other information(e.g., “perform left pose now”).

Feedback may be provided to the user with device 10 in addition to orinstead of using ear buds 24 to provide feedback. For example, a greenicon may be displayed when a pose has been successfully performed and ared icon may be displayed when a pose has not been successfullyperformed. Performance grades (e.g., A+) may be provided when a routineis complete and/or grades or other evaluation results may be displayedor otherwise provided to a user during a routine.

If desired, sensors 38 may include optical sensors. For example, acamera in ear buds 25 may gather information on a user's environment andcan be used to monitor head movement. Head-mounted LIDAR (on ahead-mounted device 10 and/or ear buds 24), image processing fromexternal cameras (e.g., a camera on device 10 in system 8), echolocation(sonar), and radio-frequency measurement techniques may also be used insystem 8 to monitor movement of the user. For example, device 10 mayemit radio-frequency signals, acoustic signals, or other signals thatare used in measuring the position of the user's head or other bodyparts. In configurations in which antennas are worn on the body of theuser, radio-frequency triangulation techniques may be used in measuringuser movement.

If desired, user movement during exercise routines or other activitiesthat involve user movement may be measured using devices other than earbuds 24 (e.g., devices that include the circuitry of ear buds 24 in adifferent form factor). These devices may include, for example, hats,helmets, earrings, headbands, glasses, head-mounted displays, or otherheadwear with sensors 38. These devices may also include necklaces,scarves, shirts, jackets, shoes, and other wearable items. Theprocessing algorithms implemented by system 8 may use sensors such asgyroscopes and/or compasses (magnetic sensors) to measure head rotationand/or accelerometer data from one or more accelerometers may beprocessed to measure head rotation (e.g., based on inertialmeasurements). In some configurations, the control circuitry of system 8may process images captured with an external camera or a body-mountedcamera. Strain-gauge measurements and/or other measurements of force anddeformation in an item such as a scarf that is worn around a user's neckmay be analyzed to measure head movement. User commands may be providedusing voice, taps against ear buds 24 that are measured by sensors 38,button presses, input into device 10 that is relayed to ear buds 24wirelessly, and/or using other input command gathering techniques. Insome arrangements, guidance (coaching) and/or feedback for a routine maybe provided both by ear buds 24 (or other wearable equipment) and device10. For example, guidance and/or feedback may be provided using audiooutput, visual output, and/or haptic output in ear buds 24 and/or indevice 10.

FIG. 7 is a flow chart of illustrative operations that may be used insystem 8 to guide a user through a guided routine such as an exerciseroutine (movement routine) while gathering information on the user'smovement, analyzing the movement, and providing corresponding feedbackbased on evaluation of the movement.

During the operations of block 92, a user may launch software in system8 or otherwise direct system 8 to begin operations involved inmonitoring the user's performance. For example, the user may launch anapplication on device 10 (e.g., by selecting an icon on a touch screendisplay, clicking on a desktop icon, providing a voice-based device witha voice command, etc.). If desired, the user may provide ear buds 24with a voice command, tap command, or other input command that launchesan exercise routine application on ear buds 24. The launched applicationor other software may run on control circuitry on ear buds 24 and/ordevice 10.

In response to user initiation of the exercise routine application orother user initiation of monitoring operations in system 8, controlcircuitry in system 8 (e.g., in ear buds 24 and/or device 10) canprovide a user with exercise routine guidance (block 94). The guidance(coaching) may be audible, visible, and/or haptic and may involve text,spoken commands, diagrams, videos, prerecorded audio clips, and/or otherinformation that helps guide the user through the routine. For example,the guidance may include an overview of the goals of the routine,information on suitable preparation for the routine (e.g., preparatoryhead movements and body stance), and real-time guidance such asstep-by-step directions provided during the routine.

While providing the user with exercise routine guidance during theoperations of block 94, the control circuitry in system 8 may usesensors 38 and/or other sensing circuitry in system 8 to gather sensormeasurements, may evaluate this input (e.g., to evaluate userperformance of an exercise routine by comparing user head poses to apredetermined sequence of head poses associated with the exerciseroutine), and may provide corresponding feedback. The feedback that isprovided may be provided by ear buds 24 and/or device 10 and may beaudible, visual, and/or haptic. If no activity is detected, themonitoring and analysis operations of block 94 may continue.

If an undesired health condition is detected (e.g., the user isdetermined to be out of breath or in distress) or if other conditionsare detected that indicate that the exercise should be terminated,suitable actions may be taken during the operations of block 98 (e.g.,an alert may be issued for the user, exercise guidance may beterminated, etc.).

If it is determined that the exercise routine has been completed,suitable action may be taken during the operations of block 96. Forexample, the user may be provided with a completed-routine performancereport, a performance report may be uploaded to an online service (e.g.,for sharing with other members of the service or for private storage),the user may be provided with tips for future routines (e.g., “next timeroll slower”), or other information related to the completion of theexercise routine or other activity of block 94 may be provided to theuser.

The foregoing is merely illustrative and various modifications can bemade to the described embodiments. The foregoing embodiments may beimplemented individually or in any combination.

What is claimed is:
 1. An ear bud, comprising: an ear bud housing; aspeaker in the ear bud housing; an orientation sensor in the ear budhousing that is configured to obtain sensor measurements; and controlcircuitry in the ear bud housing that is configured to evaluate userperformance of an exercise routine containing multiple predetermineduser head poses based on the sensor measurements.
 2. The ear bud definedin claim 1 wherein the orientation sensor is configured to obtain thesensor measurements in a first reference frame and wherein the controlcircuitry is configured to rotate the sensor measurements in the firstreference frame into a second reference frame.
 3. The ear bud defined inclaim 2 wherein the control circuitry is configured to rotate the sensormeasurements from the first reference frame into the second referenceframe using a rotation matrix and wherein the control circuitry isconfigured to calibrate the orientation sensor by computing the rotationmatrix upon detection of a quiescent period in the sensor measurements.4. The ear bud defined in claim 3 wherein the control circuitry isconfigured to analyze the measurements that have been rotated into thesecond reference frame to categorize the sensor measurements ascorresponding to respective poses among the multiple predetermined userhead poses.
 5. The ear bud defined in claim 4 wherein the controlcircuitry is configured to use a look-up table to categorize the sensormeasurements as corresponding to respective poses among the multiplepredetermined user head poses.
 6. The ear bud defined in claim 1 whereinthe control circuitry is configured to provide audible coaching with thespeaker during the exercise routine.
 7. The ear bud defined in claim 6wherein the control circuitry is configured to provide audible feedbackwith the speaker in response to detection of successful completion ofthe exercise routine.
 8. The ear bud defined in claim 6 wherein thecontrol circuitry is configured to provide audible feedback with thespeaker in response to detection of unsatisfactory performance of theexercise routine.
 9. The ear bud defined in claim 1 wherein theorientation sensor comprises an accelerometer.
 10. The ear bud definedin claim 1 wherein the orientation sensor comprises a magnetic sensor.11. The ear bud defined in claim 1 wherein the orientation sensorcomprises a gyroscope.
 12. The ear bud defined in claim 1 wherein thecontrol circuitry is configured to perform filtering operations whileobtaining the sensor measurements.
 13. The ear bud defined in claim 12wherein performing the filtering operations comprises maintaining arunning average of an output of the orientation sensor over apredetermined period of time.
 14. The ear bud defined in claim 1 whereinthe ear bud housing has a main body portion and an elongated stemportion that extends away from the main body portion.
 15. An ear bud,comprising: a housing having a main body portion and an elongated stemportion that extends away from the main body portion; a speakerconfigured to provide sound through an audio port in the main bodyportion of the housing; an accelerometer in the housing that isconfigured to obtain accelerometer data; and control circuitry in thehousing that is configured to categorize user head poses based on theaccelerometer data, wherein the accelerometer is configured to obtainthe accelerometer data in a first reference frame and wherein thecontrol circuitry is configured to rotate the accelerometer data in thefirst reference frame into a second reference frame.
 16. The ear buddefined in claim 15 wherein the control circuitry is configured toevaluate user performance of an exercise routine containing the userhead poses based on the accelerometer data.
 17. The ear bud defined inclaim 16 wherein the control circuitry is configured to provide audiblecoaching with the speaker during the exercise routine.
 18. An ear bud,comprising: a speaker; an accelerometer that is configured to obtainaccelerometer measurements; and control circuitry that is configured to:evaluate user performance of a head movement routine containing multipleuser head poses based on the accelerometer measurements; and in responseto evaluating that one of the user head poses is performedunsatisfactorily, use the speaker to provide audible feedback.
 19. Theear bud defined in claim 18 wherein the accelerometer is configured toobtain the accelerometer measurements in a first reference frame andwherein the control circuitry is configured to rotate the accelerometermeasurements in the first reference frame into a second reference frame.20. The ear bud defined in claim 1, wherein the control circuitry isconfigured to: use the speaker to provide instructions to perform theexercise routine containing the multiple predetermined user head poses.